package com.sumer.brain.sys.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.sumer.brain.common.model.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.List;

@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@Schema(name = "SysRole", description = "角色实体")
@TableName(value = "sys_role")
@Data
public class SysRole extends BaseEntity {

    @Schema(description = "角色ID")
    @TableId(type = IdType.AUTO)
    private Long roleId;

    @Schema(description = "角色名称")
    private String roleName;
    
    @Schema(description = "角色权限字符串")
    private String roleKey;

    @Schema(description = "显示顺序")
    private Integer roleSort;

    @Schema(description = "角色状态（0正常 1停用）")
    private String status;

    @Schema(description = "删除标志（0代表存在 2代表删除）")
    private String delFlag;

    @Schema(description = "备注")
    private String remark;

    @Schema(description = "菜单权限")
    @TableField(exist = false)
    private List<Long> menuIds;

}
